package builder.AssetFormBuilderPackage;

import java.awt.GridBagConstraints;

import handler.assetFormHandlers.AFAddButtonActionListener;

import javax.swing.JButton;

import builder.FormBuilder;
import builder.FormBuilderDecorator;
import form.AssetForm.AssetForm;

public class CreateDecorator extends FormBuilderDecorator {

	GridBagConstraints c = new GridBagConstraints();
	
	public CreateDecorator(FormBuilder decoratee){
		super(decoratee);
	}
	
	
	public void setFormSettings() {
		// TODO Auto-generated method stub
		super.setFormSettings();
		
	}

	@Override
	public void buildComponents() {
		// TODO Auto-generated method stub
		super.buildComponents();
		
		AssetForm assetForm = (AssetForm) decoratee.getForm();
		
		JButton btnAdd = new JButton("Add Asset");
		btnAdd.addActionListener(new AFAddButtonActionListener(assetForm));
		c.gridx = 0;
		c.gridy = 0;
		assetForm.add(btnAdd, c);
	}
}
